<script>
	export default {
		onLaunch: function() {
			console.log('App Launch')

			// 检查登录状态
			const isLogin = uni.getStorageSync('isLogin')
			if (!isLogin) {
				// 未登录，跳转到登录页
				uni.reLaunch({
					url: '/pages/login/login'
				})
			}
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style>
	/* 每个页面公共css */
	page {
		background-color: #f8f8f8;
		font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica,
			'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei',
			SimSun, sans-serif;
			height: 100%;
			box-sizing: border-box; /* 核心属性 */
	}
</style>